package com.haiya.strategy.cooking;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class CookTest {
    public static void main(String[] args) throws IOException {
        BufferedReader strin = new BufferedReader(new InputStreamReader(System.in));
        System.out.println("input cooking type: ");
        String type = strin.readLine();
        CrabCooking stratege = null;

        if (type.equals("streamed")) {
            stratege = new StreamedCrabs();
        } else if (type.equals("braised")) {
            stratege = new BraisedCrubs();
        }

        if (stratege != null) {
            Kitchen kitchen = new Kitchen();
            kitchen.setStrategy(stratege);
            kitchen.cookingMethod();
        }
    }
}
